﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Geometry;
using PlanningGIS.Framework;


namespace PlanningGIS.DataConvert.model
{
    /// <summary>
    /// 作用：数据转换抽象类
    /// </summary>
    public abstract class DataConvert : Operator2
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public DataConvert()
        {
            expression = new Expression();
            NeedDelete = false;
            NeedCut = false;
            TotalCount = 0;
            ErrorCount = 0;
            RightCount = 0;
        }
        
        /// <summary>
        /// 计算字段值的时候需要利用JavaScript中的表达式计算，例如通过字段"(3*30)/2"可以算出结果，但C#中只能作字符串
        /// </summary>
        protected Expression expression;                

        /// <summary>
        /// 目标要素类
        /// </summary>
        public IFeatureClass TargetFeatCls { get; set; }

        /// <summary>
        /// 要素总数，方便进度条显示
        /// </summary>
        public int TotalCount { get; set; }

        /// <summary>
        /// 出错总数
        /// </summary>
        public int ErrorCount { get; protected set; }

        /// <summary>
        /// 成功总数
        /// </summary>
        public int RightCount { get; protected set; }

        /// <summary>
        /// 是否删除成功入库后的源数据
        /// </summary>
        public bool NeedDelete { protected get; set; }

        /// <summary>
        /// 是否删除导出后的空图层（即没有要素的要素类）
        /// </summary>
        public bool IsDelNullData { protected get; set; }

        /// <summary>
        /// 设置裁切图形,用来做数据裁切的多边形
        /// </summary>
        public IPolygon CutPolygon { protected get; set; }

        /// <summary>
        /// 是否需要进行裁切
        /// </summary>
        public bool NeedCut { protected get; set; }

        /// <summary>
        /// 设置空间关系过滤条件
        /// </summary>
        public ISpatialFilter SpatialFilter { get; set; }
       
    }
}
